<?php
$form = $this->beginWidget('CActiveForm', array(
    'id' => 'crop-form',
        ));
?>

<div class="modal-header">
    <?php echo CHtml::link('&times;', '#', array('class' => 'close', 'data-dismiss' => 'modal')); ?>
    <h3>Crop Entry Form</h3>
</div>

<div class="modal-body">
    <?php if (Yii::app()->user->hasFlash('success')): ?>
    <div class="alert alert-success">
        <?php echo Yii::app()->user->getFlash('success'); ?>
    </div>
    <?php endif; ?>
    
    <?php echo $form->errorSummary($model, null, null, array('class' => 'alert alert-error')); ?>

    <div class="control-group">
        <?php echo $form->labelEx($model, 'alias', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'alias', array('class' => 'input-xlarge', 'size' => 50, 'maxlength' => 50)); ?>
        </div>
    </div>
    <div class="control-group">
        <?php echo $form->labelEx($model, 'name', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'name', array('class' => 'input-xlarge', 'size' => 50, 'maxlength' => 50)); ?>
        </div>
    </div>
</div>

<div class="modal-footer">
    <?php echo CHtml::htmlButton($model->isNewRecord ? 'Create' : 'Save', array('class' => 'btn btn-primary', 'type' => 'submit')); ?>
</div>
<?php $this->endWidget(); ?>